#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void Find_key(int arr[][4], int key)
{
	int i = 0;
	int flag = 0;
	for (i = 0; i < 3; i++)
	{
		int left = 0;
		int right = 3;
		int mid = 0;
		while (left <= right)
		{
			mid = (right - left) / 2 + left;
			if (arr[i][mid] < key)
			{
				left += 1;
			}
			else if (arr[i][mid] > key)
			{
				right -= 1;
			}
			else
			{
				flag = 1;
				printf("找到了，下标为：%d %d\n", i, mid);
				break;
			}
		}
		if (flag)
		{
			break;
		}
	}
	if (flag == 0)
	{
		printf("找不到这个数\n");
	}
}

int main()
{
	int arr[3][4] = { {1,2,3,4},{5,6,7,8},{9,10,11,12} };
	int key = 0;
	scanf("%d", &key);
	Find_key(arr,key);
	return 0;
}